package com.cskt.petproject178.pojo.exception;

import com.cskt.petproject178.pojo.vo.ResultStatusEnum;
import com.cskt.petproject178.pojo.vo.StatusEnum;

/**
 * 全局统一的异常
 *
 * @author 27013
 **/


public class BaseException extends RuntimeException{
    private String code;


    public BaseException(String message, String code) {
        super(message);
        this.code = code;
    }

    public BaseException(StatusEnum statusEnum) {
        super(statusEnum.getMsg());
        this.code = statusEnum.getCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
